package com.example.treeutil.model;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.ArrayList;
import java.util.List;

/**
 * 2022/12/9
 *
 * @author fengyu
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Catalog {
    private String id;
    private String pid;
    private String name;
    private int index;
    private List<Catalog> subs = new ArrayList<>();


    public Catalog(){}
    public Catalog(String id, String pid, String name, int index){
        this.index = index;
        this.id = id;
        this.pid = pid;
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }

    public List<Catalog> getSubs() {
        return subs;
    }

    public void setSubs(List subs) {
        this.subs = subs;
    }
}
